using System.Collections;
using System.Collections.Generic;

namespace MetaObjects.Contracts
{
	public interface IEntityCollection : IEnumerable
	{
		object this[object key] { get; }
		bool Contains(object key);
	}

	public interface IEntityCollection<T> : IEntityCollection, IEnumerable<T>
		where T: IEntity
	{
		new T this[object key] { get; }
	}

	public interface IEntityCollection<T, TKey> : IEntityCollection<T>
		where T : IEntity<TKey>
	{
		T this[TKey key] { get; }
		bool Contains(TKey key);
	}
}